package com.om.data;

import java.util.ArrayList;

public class Quiz {
	
	int errorsNum = 0;
	
	private ArrayList<QuestionDS> questions;

	public ArrayList<QuestionDS> getQuestions() {
		return questions;
	}
	
	

	public void setQuestions(ArrayList<QuestionDS> questions) {
		this.questions = questions;
		errorsNum = 0;
	}

	public Quiz() {
		questions = new ArrayList<QuestionDS>();
		errorsNum = 0;
	}
	
	public void addQestionDS(QuestionDS qDS){
		questions.add(qDS);
	}
	
	public int getNumOfQuestion(){
		return questions.size();
	}
	
	public void omitQuestions(int numOfExtraQuestions){
		int end = questions.size() - numOfExtraQuestions;
		questions = (ArrayList<QuestionDS>) questions.subList(0, end);
	}
	
	public int getErrorsNum(){
		return errorsNum;
	}
	
	public void addError(){
		errorsNum++;
	}
	

}
